home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / UNITRK.ZIP / unitrk.doc < prev   
Text File  |  1995-01-24  |  1KB  |  29 lines

  1. The UNITRK(tm) Format:
  2. ======================
  3.  
  4. A UNITRK stream is an array of bytes representing a single track of a
  5. pattern. It's made up of 'repeat/length' bytes, opcodes and operands (sort
  6. of a assembly language):
  7.  
  8. rrrlllll
  9. [REP/LEN][OPCODE][OPERAND][OPCODE][OPERAND] [REP/LEN][OPCODE][OPERAND]..
  10. ^                                         ^ ^
  11. |-------ROWS 0 - 0+REP of a track---------| |-ROWS xx - xx+REP of a track..
  12.  
  13.  
  14. The len field (lower 5 bits) of the rep/len byte contains the number of
  15. bytes in the current row, _including_ the rep/len byte itself (So the len
  16. field of row in the previous example would have a value of 5). This makes
  17. it easy to search through a stream for a particular row. A track is conclu-
  18. ded by a 0-value rep/len byte.
  19.  
  20. The upper 3 bits of the rep/len byte contain the number of times -1 this
  21. row is repeated for this track (so a value of 7 means this row is repeated
  22. 8 times).
  23.  
  24. Opcodes can range from 1 to 255 but currently only opcodes 1 to 19 are
  25. being used. Each opcode can have a different number of operands. You can
  26. find the number of operands to a particular opcode by using the opcode as
  27. an index into the 'unioperands' table (UNITRK.C) . The opcodes itself are
  28. defined in 'UNITRK.H'.
  29.